package com.chat.mapper;

import com.chat.entity.File;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 文件Mapper
 */
public interface FileMapper {

//     <select id="selectFileById" resultMap="FileMap">
//    SELECT * FROM file where id = #{fileId}
//    </select>
//
//    <select id="selectFileByUserId" resultMap="FileMap">
//    SELECT * FROM file where user_id = #{userId}
//    </select>
//
//    <select id="selectFileByRoom">
//    SELECT * FROM file where room_id = #{roomId}
//    </select>
//
//    <insert id="insertFile">
//    insert into file values(null,#{userId},#{roomId},#{fileName},#{fileUrl})
//    </insert>
    File selectFileById(int fileId);
    List<File> selectFileByRoom(int roomId);
    void insertFile(File file);
    List<File> selectFileByUserId(int userId);
}
